# -*- coding: utf-8 -*-
# Author: xiantingDeng
# File: handler.py
# Time: 9:48


from bin.common.conversion import piece_together_element
from bin.util.page_util import BasePage

login_page, login_name = piece_together_element("login")
logout_page, logout_name = piece_together_element("logout")


class LoginPage(BasePage):
    name = login_name

    def load_android(self):
        self.activity = "com.jumei.login.loginbiz.activities.login.LoginActivity"
        self.我的按钮 = self.get_locator(login_page.get("我的按钮"))
        self.登录注册按钮 = self.get_locator(login_page.get("登录注册按钮"))
        self.切换账号密码登录按钮 = self.get_locator(login_page.get("切换账号密码登录按钮"))
        self.账号输入框 = self.get_locator(login_page.get("账号输入框"))
        self.密码输入框 = self.get_locator(login_page.get("密码输入框"))
        self.同意用户协议按钮 = self.get_locator(login_page.get("同意用户协议按钮"))
        self.登录按钮 = self.get_locator(login_page.get("登录按钮"))
        self.头像 = self.get_locator(login_page.get("头像"))
        self.会员中心 = self.get_locator(login_page.get("会员中心"))

class LogOutPage(BasePage):
    name = logout_name

    def load_android(self):
        self.我的按钮 = self.get_locator(logout_page.get("我的按钮"))
        self.设置按钮 = self.get_locator(logout_page.get("设置按钮"))
        self.个人资料按钮 = self.get_locator(logout_page.get("个人资料按钮"))
        self.关于聚美按钮 = self.get_locator(logout_page.get("关于聚美按钮"))
        self.退出账号按钮 = self.get_locator(logout_page.get("退出账号按钮"))
        self.确认按钮 = self.get_locator(logout_page.get("确认按钮"))
        self.取消按钮 = self.get_locator(logout_page.get("取消按钮"))



if __name__ == '__main__':
    print(LogOutPage().我的按钮)